//
//  EditUserMessageCell.m
//  New_Runway
//
//  Created by mack on 2018/2/7.
//  Copyright © 2018年 NelsonJ. All rights reserved.
//

#import "EditUserMessageCell.h"

@implementation EditUserMessageCell

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        [self addAllViews];
        self.contentView.backgroundColor = [UIColor whiteColor];
    }
    return self;
}

-(void)addAllViews{
    kSelfWeak;
    self.mainLabel = [[UILabel alloc] init];
    [self.contentView addSubview:self.mainLabel];
    self.mainLabel.textColor = MAIN_FONT_COLOR();
    self.textLabel.font = kFontSize(13);
    [weakSelf.mainLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(weakSelf.contentView).mas_offset(16);
        make.centerY.equalTo(weakSelf.contentView);
    }];
    
    self.centerTF = [[UITextField alloc] init];
    [self.contentView addSubview:self.centerTF];
    [self.centerTF setValue:UIColorHex(0xcfcfcf) forKeyPath:@"_placeholderLabel.textColor"];
    [self.centerTF setValue:kFontSize(12) forKeyPath:@"_placeholderLabel.font"];
    self.centerTF.textColor = MAIN_FONT_COLOR();
    self.centerTF.font = kFontSize(13);
    self.centerTF.tintColor = MAIN_NAV_COLOR();
    [weakSelf.centerTF mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(weakSelf.contentView).mas_offset(100);
        make.centerY.equalTo(weakSelf.contentView);
        make.right.equalTo(weakSelf.contentView).mas_offset(-16);
    }];
    
    UIView  *line = [[UIView alloc] init];
    line.backgroundColor = MAIN_LINE_COLOR();
    [self.contentView addSubview:line];
    [line mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.right.bottom.equalTo(weakSelf.contentView);
        make.height.mas_offset(0.5);
    }];
    
    
}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
